package com.firstgroup.repository;

import com.firstgroup.domain.Interviewers;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

@Mapper
public interface InterviewersMapper {
    /**
     * 根据年遍历数据
     * @param year
     * @return
     */
    //List<Interviewers> findByYear(String year);

    @Query("select  q from Interviewers q where q.registTime like CONCAT('%',?1,'%') ")
    List<Interviewers> findByYear(String year);

    /**
     * 查找重复报名的人
     * @return
     */
    List<Interviewers> findStudentIdByRepeat();

    /**
     * 根据学号查找list
     * @param studentId
     * @return
     */
    List<Interviewers> findInterviewersByStudentId(String studentId);
}
